package com.kehongborui.staff.model;/**
 * @Description:   类描述
 * @Author:         XCQ
 * @email:          mr_xcq@163.com
 * @CreateDate:    2018-11-29 15:56
 * @UpdateUser:    username
 * @UpdateDate:    xxxx-xx-xx
 * @UpdateRemark:  修改内容
 * @Version:         1.0
*/
public class Page {
    private int currentPage=1;
    private int pageSize=2;
    private int totalPage;
    private int totalNum;
    private int startIndex;

    public int getCurrentPage() {
        return currentPage;
    }

    public void setCurrentPage(int currentPage) {
        this.currentPage = currentPage;
    }

    public int getPageSize() {
        return pageSize;
    }

    public void setPageSize(int pageSize) {
        this.pageSize = pageSize;
    }

    public int getTotalPage() {
        return totalPage;
    }

    public void setTotalPage(int totalPage) {
        this.totalPage = totalPage;
    }

    public int getTotalNum() {
        return totalNum;
    }

    public void setTotalNum(int totalNum) {
        this.totalNum = totalNum;
    }

    public int getStartIndex() {
        if (currentPage>0 && pageSize >0)
            startIndex = (currentPage - 1) * pageSize;
        return startIndex;
    }

    public void setStartIndex(int startIndex) {
        this.startIndex = startIndex;
    }
}
